package com.yc.springboot.biz;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserAction {

    @Resource
    private UserBiz userBiz;

    @GetMapping("sign")
    public String login(String name, String pwd, String date) {
        userBiz.login(name, pwd, date);
        return "登录成功!";
    }

    @GetMapping("isonline")
    public boolean isonline(String name) {
        return userBiz.isOnline(name);
    }

    @GetMapping("onlines")
    public long onlines(String name) {
        return userBiz.countOnline(name);
    }
}
